//
//  UICustomerInspectable.swift
//  JJToolSwift
//
//  Created by heihei on 2024/5/10.
//  xib和storyboard中自定义选项

import Foundation

extension UIView {
    /// 边框颜色
    @IBInspectable var borderColor: UIColor? {
        get {
            if let color = layer.borderColor {
                return UIColor(cgColor: color)
            }
            return nil
        }
        set {
            layer.borderColor = newValue?.cgColor
        }
    }

    /// 阴影颜色
    @IBInspectable var shadowColor: UIColor? {
        get {
            if let color = layer.borderColor {
                return UIColor(cgColor: color)
            }
            return nil
        }
        set {
            layer.shadowColor = newValue?.cgColor
        }
    }
}
